﻿using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Model
{
    public abstract class Shape
    {
        /// <summary>
        /// 形状名称
        /// </summary>
        public string Name { get; set; }
        /// <summary>
        /// 起始点
        /// </summary>
        public Point StartPoint { get; set; }
        /// <summary>
        /// 颜色
        /// </summary>
        public Color Color { get; set; }
        /// <summary>
        /// 节点坐标位置
        /// </summary>
        public List<Point> TrajectoryPoints { get; set; }


        public Shape(Point startPoint, Color color, string name)
        {
            Name = name;
            StartPoint = startPoint;
            Color = color;
            TrajectoryPoints = new List<Point>();
        }

        public abstract void Draw(Graphics g);
        public abstract void Update(Point currentPoint);

        public override string ToString()
        {
            return Name;
        }
    }
}
